import request from '@/utils/request'

// 查询比赛列表
export function listplay(query) {
  return request({
    url: '/work/competition/list',
    method: 'get',
    params: query
  })
}

// 查询比赛详细
export function getplay(id) {
  return request({
    url: '/work/competition/' + id,
    method: 'get'
  })
}

// 新增比赛
export function addplay(data) {
  return request({
    url: '/work/competition/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改比赛
export function updateplay(data) {
  return request({
    url: '/work/competition/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除比赛
export function delplay(id) {
  return request({
    url: '/work/competition/delete-by-id',
    method: 'get',
    params: {
      "id": id
    }
  })
}

// 删除比赛
export function delplays(ids) {
  return request({
    url: '/work/competition/delete-by-ids',
    method: 'get',
    params: {
      "ids": ids
    }
  })
}


// 获取组别dic
export function getGroupsDic(ids) {
  return request({
    url: '/work/competition/getGroupDic',
    method: 'get',
  })
}